#include "CQuestion.h"
#include <QVariant>


CQuestion::CQuestion()
{
	textQuestion = QString();
	listAnswer = CListAnswer();
	textComment = QString();
	whoAmI = questionMulti;
	_isChanged = false;
        _new = false;
}

void CQuestion::setTextQuestion(const QString text)
{
    this->textQuestion = text;
}

QString CQuestion::getTextQuestion() const
{
    return this->textQuestion;
}

void CQuestion::setListAnswer(const CListAnswer listAnswer)
{
    this->listAnswer = listAnswer;
}

CListAnswer CQuestion::getListAnswer() const
{
    return listAnswer;
}

void CQuestion::setQuestionType(int whoAmI)
{
    this->whoAmI = whoAmI;
}

int CQuestion::getQuestionType() const
{
    return this->whoAmI;
}

void CQuestion::changed(bool f)
{
    this->_isChanged = f;
}

bool CQuestion::isChanged()
{
    return _isChanged;
}

bool CQuestion::isNew()
{
    return _new;
}

void CQuestion::setNew(bool f)
{
    this->_new = f;
}

void CQuestion::setComment(QString text)
{
    this->textComment = text;
}

QString CQuestion::getComment() const
{
    return this->textComment;
}

//QString CQuestion::toString()
//{
//    QString str;
//    str = this->textQuestion+"\n";
//    for (i=0; i<this->listAnswer.count(); i++)
//    {
//	str += listAnswer.getAnswer(i).getTextAnswer() + "\n";
//	str += QVariant(listAnswer.getAnswer(i).isRightAnswer()).toString() + "\n";
//	str += listAnswer.getAnswer(i).getComment() + "\n";
//    }
//    return str;
//}
